<?php


namespace api\web\controller;


use api\web\model\IndexModel;
use cmf\controller\RestBaseController;
use think\facade\Db;

class IndexController extends RestBaseController
{
    //显示导航菜单
    public function index(){
        $list = IndexModel::with('child')
            ->where('parent_id', 0)
            ->select();
        $this->success('导航菜单', $list);
    }
}